#include<iostream>
#include<vector>
#include<queue>
#include<algorithm>
using namespace std;
class Solution {
public:
    priority_queue<int>Q;
    int findKthLargest(vector<int>& nums, int k) {
        for(int n:nums) {
            Q.push(n);
        }
        int cnt=0;
        while(!Q.empty()) {
            cnt++;
            if(cnt==k)
                return Q.top();
            Q.pop();
        }
        return 0;
    }
};
